<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/bootstrap/bootstrap.css">
    <link rel="stylesheet" href="js.css">
    <script src="javastript.js"></script>
    <title>Document</title>
</head>

<body>
    <h2 id="demo">dddddd</h2>
    <script>
        document.getElementById("demo").innerHTML = "222222";
        //这个不能写到js文件里面吗？

    </script>

    <!-- js:void(0)  -->
    <a href="javastript:void(0)">void 只计算表达式，不返回值，所以这个点击后，它不会跳转到链接</a>
    <a href="javastript:void(alert('Don touch me!'))">不要点我</a>

    <button class="btn1" type="button" onclick="func()">click me</button>

</body>

</html>